package org.hyf.inspur.LessonDesin.clear;

public class test {

    public static void main(String[] args){

        String s = "http://123.151.176.115:8080/?tk=2732416aa96c55a3db6cf9ebe1e9d30123dfafa6c1705e4133334f10bafb89f7323f6e7f03b881db21133b1bf2ae5bc5&iv=40c1c486ce214c98&encrypt=17";
        String domain = s.split("/", -1)[2];
        if (domain.contains(":")) {
           String domain1 = domain.split("\\:", -1)[0];
           System.out.println("分割//得到的结果"+domain1);
        }
        System.out.println("分割/得到的结果"+domain);
    }




}
